package homework007.domain;

/**
 * 商品实体类
 *
 * @author itheima
 */
public class Goods {
    private String id;
    private String name;
    private String price;

    /**
     * 构造方法（包含空参和全参构造）
     */
    public Goods() {
    }

    public Goods(String id, String name, String price) {
        this.id = id;
        this.name = name;
        this.price = price;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    /**
     * 重写toString方法用于打印
     *
     * @return String
     */
    @Override
    public String toString() {
        return id + "\t\t" + name + "\t\t" + price + "元";
    }
}
